import Home from "../views/Home"
import {lazy} from "react"
const routes=[{
    path:'/home',
    component:Home,
    children:[{
        path:'/home/homepage',
        component :lazy(()=>import('../views/home/homeage')),
        text:"首页",      
       
    },
    {
        path:'/home/classfiy',
        component :lazy(()=>import('../views/home/classfiy')),
        text:"分类",       
    },
    {
        path:'/home/shopcar',
        component :lazy(()=>import('../views/home/shopcar')),
        text:"购物车",       
    },
    {
        path:'/home/menu',
        component :lazy(()=>import('../views/home/menu')),
        text:"菜单",       
    },
    {
        path:'/home/my',
        component :lazy(()=>import('../views/home/my')),
        text:"我的",       
    },
]
},
{
    path:'/details',
    component: lazy(()=>import('../views/Details')),
},
{
    path:'/login',
    component:lazy(()=>import('../views/Login'))
},
{
    path:'/serch',
    component:lazy(()=>import('../views/Serch'))
},{
    path:'/',
    // redirect: '/',  // 重定向:重新指向其它path,会改变网址
   redirect:"/Home/homepage"

}

]
export default routes